// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-array.isarray
description: Array.isArray return false if its argument is not an Array
---*/

function Test() {
    assert.sameValue(Array.isArray(42), false, 'Array.isArray(42) must return false');
    assert.sameValue(Array.isArray(undefined), false, 'Array.isArray(undefined) must return false');
    assert.sameValue(Array.isArray(true), false, 'Array.isArray(true) must return false');
    assert.sameValue(Array.isArray("abc"), false, 'Array.isArray("abc") must return false');
    assert.sameValue(Array.isArray({}), false, 'Array.isArray({}) must return false');
    assert.sameValue(Array.isArray(null), false, 'Array.isArray(null) must return false');
}

// preheat
const NUMBER_OF_PREHEAT = 1;
for (let i = 0; i < NUMBER_OF_PREHEAT; i++) {
    Test();
}

ArkTools.jitCompileAsync(Test);
assert.sameValue(ArkTools.waitJitCompileFinish(Test), true, '[JIT] JIT disabled.');

// test
const NUMBER_OF_TEST = 1; // or 2
for (let i = 0; i < NUMBER_OF_PREHEAT; i++) {
    Test();
}
